#include <iostream>


class nocopyable {
public:
    nocopyable(const nocopyable&) = delete;
    void operator = (const nocopyable&) = delete;
protected:
    nocopyable() = default;
    ~nocopyable() = default;
};

class TestClassA : nocopyable {
public:
    TestClassA() = default;
    ~TestClassA() {
        std::cout << "TestClass A deconsturction" << std::endl;
    }
};

class TestClassB {
public:
    TestClassB() = default;
    ~TestClassB() {
        std::cout << "TestClass B deconsturction" << std::endl;
    }
};

class TestClassC : public TestClassB {
public:
    TestClassC() {

    }
    ~TestClassC() {
        std::cout << "TestClass c deconsturction" << std::endl;
    }
};

int main(int argc, char* argv[]) {
    TestClassA a;
    // TestClassA b = a;
    TestClassB c;
    TestClassB d = c;
    TestClassB *e = new TestClassC();
    delete e;
    return 0;
}